load("@fbcode_macros//build_defs:rust_binary.bzl", "rust_binary")
load("@fbsource//tools/build_defs:glob_defs.bzl", "glob")

oncall("cpplangex")

rust_binary(
    name = "rust-project",
    srcs = glob([
        "src/**/*.rs",
        "templates/*",
    ]),
    autocargo = {
        "cargo_toml_config": {
            "package": {
                "description": "Generate rust-project.json",
                "readme": "README.md",
            },
        },
        "cargo_toml_dir": ".",
    },
    compatible_with = [
        "ovr_config//os:linux",
        "ovr_config//os:macos",
    ],
    contacts = ["oncall+cpplangex@xmail.facebook.com"],
    crate_root = "src/main.rs",
    link_style = "static",
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:atty",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:tracing-subscriber",
    ],
)
